package com.example.medical.Controller;

import com.example.medical.Bean.dilixinxi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.example.medical.Mapper.dlxxMapper;
import java.util.List;

@Controller
public class DlxxController {
    @Autowired
    private dlxxMapper dlxxMapper;

    /**
     * 接收请求，返回list界面
     * @return
     */
    @RequestMapping("/dlxx/list")
    public String list(){
        return "dlxx/list";
    }

    /**
     * 接收传值请求，返回地理信息json
     * @return
     */
    @GetMapping("/dlxxList")
    @ResponseBody
    public List<dilixinxi> getDlxxList() {
        // 从数据库中获取数据
        return dlxxMapper.getAll();
    }

    /**
     * 接收新建请求，向dlxx表中插入数据
     */
    @PostMapping("insertDlxx")
    public void insertDlxx(){

    }

    /**
     * 接收更新请求，更新dlxx表内容
     */
    @PutMapping("updateDlxx")
    public void updateDlxx(){

    }
}
